require "albacore"
require_relative "PackageManager"
require_relative "NuGet"

task :default => [:build]

desc "Builds the entire solution using MsBuild"
msbuild :build => [:nuspec, :nuspec_update_system, :version, :nuget_update] do |msb|
  msb.properties :configuration => :Debug
  msb.targets :Clean, :Build
  msb.solution = "Patterns and Practices.sln"
end

task :nuspec => [:nuspec_patterns, :nuspec_patterns_web, :nuspec_patterns_inversion_all]

desc "Updates all nuspec files to include all relevant system references."
task :nuspec_update_system do
  puts "nuspec_update_system functionality coming soon"
end

desc "Updates the version file with the current version number"
task :version do
  system('tools/patterns-tools -cg -t assemblyInfo -o SolutionAssemblyInfo.cs -p "Patterns and Practices" -v ' + Version::current_version)
end

desc "Iterates the current package setup and updates everything to the latest version"
task :nuget_update do
  puts "nuget_update functionality coming soon"
end